// 引入
import { createRouter, createWebHistory } from 'vue-router'
import index from '@/views/index.vue';
import cust from '@/views/contents/cust.vue';
import file from '@/views/contents/file.vue';

// 创建路由器
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
        path:'/',
        redirect:'/index'
    },
    {
        path:'/index',
        name: index,
        component: index,
        children:[
            {
                path:'cust',
                name: cust,
                component:cust
            },
            {
                path:'file',
                name:file,
                component:file
            }
        ]
    }
  ]
})

export default router
